$(function() {
	
	$('#li_main').addClass('active');
	
	var workstatus=$('#workstatus').attr('data-percent');
	if(workstatus>50 && workstatus <=75){
		$('#workstatus').removeClass('green');
		$('#workstatus').addClass('yellow');
	}else if(workstatus <=50){
		$('#workstatus').removeClass('green');
		$('#workstatus').addClass('red');
	}
	
	var backupstatus=$('#backupstatus').attr('data-percent');
	if(backupstatus>50 && backupstatus <=75){
		$('#backupstatus').removeClass('green');
		$('#backupstatus').addClass('yellow');
	}else if(backupstatus <=50){
		$('#backupstatus').removeClass('green');
		$('#backupstatus').addClass('red');
	}
	
	var connumstatue=$('#connumstatue').attr('data-percent');
	if(connumstatue>50 && connumstatue <=75){
		$('#connumstatue').removeClass('green');
		$('#connumstatue').addClass('yellow');
	}else if(connumstatue <=50){
		$('#connumstatue').removeClass('green');
		$('#connumstatue').addClass('red');
	}
	
	var diskstatus=$('#diskstatus').attr('data-percent');
	if(diskstatus<100 && diskstatus>50){
		$('#diskstatus').removeClass('green');
		$('#diskstatus').addClass('red');		
	}else if(diskstatus<=50 && diskstatus>0){
		$('#diskstatus').removeClass('green');
		$('#diskstatus').addClass('yellow');
	}
	
	var memstatus=$('#memstatus').attr('data-percent');
	if(memstatus<100 && memstatus>50){
		$('#memstatus').removeClass('green');
		$('#memstatus').addClass('red');
	}else if(memstatus<=50 && memstatus>0){
		$('#memstatus').removeClass('green');
		$('#memstatus').addClass('yellow');
	}
	
	var cpustatus=$('#cpustatus').attr('data-percent');
	if(cpustatus<100 && memstatus>50){
		$('#cpustatus').removeClass('green');
		$('#cpustatus').addClass('red');
	}else if(cpustatus<=50 && cpustatus>0){
		$('#cpustatus').removeClass('green');
		$('#cpustatus').addClass('yellow');
	}
	
	$('.easy-pie-chart .number.yellow').easyPieChart({
		animate : 1000,
		size : 75,
		lineWidth : 3,
		barColor : '#ffb848'
	});

	$('.easy-pie-chart .number.green').easyPieChart({
		animate : 1000,
		size : 75,
		lineWidth : 3,
		barColor : '#35aa47'
	});

	$('.easy-pie-chart .number.red').easyPieChart({
		animate : 1000,
		size : 75,
		lineWidth : 3,
		barColor : '#e02222'
	});

	
	
});